package com.weijian.dal.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.io.Serializable;
import java.time.LocalDate;

/**
 * 用户签到统计实体类
 * 存储用户的签到统计数据，配合Redis Bitmap使用
 */
@Data
@EqualsAndHashCode(callSuper = true)
@SuperBuilder
@TableName("user_signin_stats")
@NoArgsConstructor
@AllArgsConstructor
public class UserSignInStats extends BaseDO {
    
    private static final long serialVersionUID = 1L;
    
    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    
    /**
     * 用户ID
     */
    @TableField("user_id")
    private Long userId;
    
    /**
     * 总签到天数
     */
    @TableField("total_sign_days")
    private Integer totalSignDays;
    
    /**
     * 当前连续签到天数
     */
    @TableField("current_continuous_days")
    private Integer currentContinuousDays;
    
    /**
     * 最大连续签到天数
     */
    @TableField("max_continuous_days")
    private Integer maxContinuousDays;
    
    /**
     * 最后签到日期
     */
    @TableField("last_sign_date")
    private LocalDate lastSignDate;
    
    /**
     * 累计获得积分
     */
    @TableField("total_reward_points")
    private Integer totalRewardPoints;
    
    /**
     * 累计获得经验值
     */
    @TableField("total_reward_exp")
    private Integer totalRewardExp;
}